package com.ckjava.test.component;

import com.ckjava.test.annotation.OrderHandlerType;
import com.ckjava.test.entity.UserEntity;
import com.ckjava.test.handler.AbstractHandler;
import com.ckjava.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@OrderHandlerType(16)
public class DispatchModeProcessor extends AbstractHandler {

    @Autowired
    private UserService userService;

    @Override
    public void handle(UserEntity userEntity) {


        userService.checkAge(userEntity.getAge());
    }
}